import request from "../utils/requset";

// 获取商品详细信息
export const goodsDetail = async (productID: string) => {
  return request.post<any, any>("/product/getDetails", {
    productID,
  });
};

// 获取商品图片
export const goodsImg = async (productID: any) => {
  return await request.post<any, any>("/product/getDetailsPicture", {
    productID,
  });
};

// 加入购物车
export const shoppingCart = async (user_id: any, product_id: any) => {
  return await request.post<any, any>("/user/shoppingCart/addShoppingCart", {
    user_id,
    product_id,
  });
};
// 添加收藏
export const addCollect = async (user_id: any, product_id: any) => {
  return await request.post<any, any>("/user/collect/addCollect", {
    user_id,
    product_id,
  });
};
